{template 'common/header'}

<div class="main">
    <div class="panel panel-info">
        <div class="panel-heading">
            分享达人详细数据  |  总数:{$total}　　
            <a class="btn btn-default" href="{php echo $this->createWebUrl('eso_sharelist',array('id'=>$_GPC['id']))}">分享达人管理</a>　
            <a class="btn btn-info" href="{php echo $this->createWebUrl('eso_sharedata',array('id'=>$_GPC['id']))}">分享点击数据管理</a>
        </div>
    </div>

    <div class="panel panel-default">
        <div class="panel-body table-responsive">
            <table class="table table-hover goodslist">
                <thead class="navbar-inner">
                <tr>
                    <th style="width:40px;" class="row-first">选择</th>
                    <th style="width:100px;" class="row-hover">ID<i></i></th>
                    <th style="width:200px;">用户openid<i></i></th>
                    <th style="width:200px;">分享达人IP<i></i></th>
                    <th style="width:200px;">分享点击时间<i></i></th>
                    <th style="width:60px;">操作</th>
                </tr>
                </thead>
                <tbody>
                {php $i=1;}
                {loop $list_eso_sharedata $row}
                <tr>
                    <td class="row-first"><input type="checkbox" name="select[]" value="{$row['id']}" /></td>
                    <td class="row-hover">{$row['id']}</td>
                    <td><a href="{php echo url('mc/member/post', array('uid'=>$row['userid']))}">{$row['from_user']}</a></td>
                    <td>{$row['eso_shareip']}</td>
                    <td>{php echo date('Y-m-d h:i:s', $row[eso_sharetime]);}</td>
                    <td style="width:40px;font-size:12px; color:#666;">
                        <a href="{php echo create_url('site/entry/deldata', array('m' => 'eso_share','rid' => $row['rid'], 'id' => $row['id'], 'status' => 0))}" class="">删除</a>
                    </td>
                </tr>
                {php $i++;}
                {/loop}
                {if !$list_eso_sharedata}
                <tr>
                    <td colspan="6" align="center">
                        <div>无</div>
                    </td>
                </tr>
                {else}
                <tr>
                    <td style="width:40px;" class="row-first"><input type="checkbox" class="check_all" /></td>
                    <td colspan="5">
                        <input type="submit" name="deleteall" value="删除" class="btn btn-primary" />
                        <input type="hidden" name="token" value="{$_W['token']}" />
                    </td>
                </tr>
                {/if}
                </tbody>
            </table>
        </div>
    </div>
    {$pager}
</div>
<script>
    $(function(){
        $(".check_all").click(function(){
            var checked = $(this).get(0).checked;
            $("input[type=checkbox]").prop("checked", checked);
        });
        $("input[name=deleteall]").click(function(){

            var check = $("input:checked");
            if (check.length < 1){
                alert('请选择要删除的记录!');
                return false;
            }
            if (confirm("确认要删除选择的记录?")){
                var id = new Array();
                check.each(function(i){
                    id[i] = $(this).val();
                });
                $.post('./index.php?c=site&a=entry&do=eso_sharelist&m=eso_share', {idArr:id}, function(data){
                    location.reload();
                }, 'json');
            }

        });
    });
</script>


{template 'common/footer'}